<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <!-- meta -->
    <meta charset="UTF-8">
    <title></title>
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.js"></script>
    <link rel="stylesheet" type="text/css" href="webpage/com/recruit/company/css/login/login.css" />
</head>

<body>
<!-- 页面主体START -->
<header class="sso_header">
</header>
<div class="content_box cleafix">
    <div class="left_area fl">
        <div class="form_head">
            <ul class="form_head clearfix">
                <li class="active" data-lg-tj-id="1Us0" data-lg-tj-no="idnull" data-lg-tj-cid="idnull">
                    密码登录
                </li>
            </ul>
            <span class="tab_active"></span>
        </div>
        <div class="form_body" data-view="passwordLogin">
            <form class="active login" action="userLoginContoller.do?doLogin" method="post">
                <div class="input_item clearfix">
                    <input type="text" class="input input_white" id="username" name="userName" placeholder="请输入用户名">
                </div>
                <div class="input_item clearfix">
                    <input type="password" class="input input_white" id="password" name="password" placeholder="请输入密码">
                </div>

                <div class="input_item clearfix">
                    <a rel="nofollow" href="#" class="forgot_pwd"></a>
                </div>
                <div class="input_item btn_group clearfix" data-propertyname="submit" data-controltype="Botton">
                    <input type="button" class="btn btn_green btn_active btn_block btn_lg" value="登&nbsp;录" onclick="login()">
                </div>
            </form>
        </div>
        <div class="form_body" data-view="codeLogin">

        </div>
    </div>
    <div class="divider fl"></div>
    <div class="right_area fl">
        <h5>还没有帐号:${sessionScope.username }</h5>
        <a href="userLoginContoller.do?toRegister" class="register_now" data-lg-tj-id="1ja0" data-lg-tj-no="idnull" data-lg-tj-cid="idnull">立即注册</a>
    </div>
    <div class="right_area fl">
        <a href="indexContoller.do?toIndex" class="register_now" data-lg-tj-id="1ja0" data-lg-tj-no="idnull" data-lg-tj-cid="idnull">返回首页</a>
    </div>
</div>

<input type="hidden" id="msg" value="${msg }">

<script type="text/javascript">

	function login(){
		var username = $("#userName").val();
		var password = $("#password").val();
		if(username == ""){
			alert("账号不能为空");
		}else{
			if(password == ""){
				alert("密码不能为空")
			}else{
				$(".login").submit();
			}
		}
	}


	
	
	(function(){
		var msg = $("#msg").val();
		if(msg==0){
			alert("用户名不存在");
		}else{
			if(msg==2) alert("用户名或密码不正确");
		}
	})(); 
	
</script>

</body>
</html>
